class CreateContents < ActiveRecord::Migration
  def self.up
    create_table :contents do |t|
      t.string :mime_type, :limit => 255, :null => false
      t.string :name, :limit => 100, :null => false
      t.integer :size, :default => 0
      t.references :user, :null => false
      t.references :forum
      t.references :didatic_material
      t.references :answer_content

      t.timestamps
    end
  end

  def self.down
    drop_table :contents
  end
end
